<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var weekArray = new Array("日","一","二","三","四","五","六")
        var  da = '2025-11-11';
        var week = weekArray[new Date(da).getDay()];
        console.log(week)
    </script>

    <script>
		function getDays(date1 , date2){
			var date1Str = date1.split([2021,9,17]);
			var date1Obj = new Date(date1Str[0],(date1Str[1]-1),date1Str[2]);
			var date2Str = date2.split([2025,11,11]);
			var date2Obj = new Date(date2Str[0],(date2Str[1]-1),date2Str[2]);
			var t1 = date1Obj.getTime();
			var t2 = date2Obj.getTime();
			var dateTime = 1000*60*60*24; 
			var minusDays = Math.floor(((t2-t1)/dateTime));
			var days = Math.abs(minusDays);
			return days;
		}
    </script>

    <script>
        
        var arr = Date.UTC(2025,11,11,0,0),
        now = (new Date()).getTime();//现在时间
        diffMS = arr - now;
        d = 24 * 60 * 60 * 1000; 
        diffD = diffMS / d;
        console.log(diffMS)
        console.log(diffD)
    </script>
    <script>
        function datedifference(sDate1, sDate2) {    //sDate1和sDate2是2006-12-18格式  
        var dateSpan,
            tempDate,
            iDays;
        sDate1 = Date.parse(sDate1);
        sDate2 = Date.parse(sDate2);
        dateSpan = sDate2 - sDate1;
        dateSpan = Math.abs(dateSpan);
        iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
        return iDays
    };
    </script>
</body>
</html>